<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>订单列表</title>
    <link rel="stylesheet" href="/css/bootstrap.css" th:href="@{/css/bootstrap.css}"/>
</head>

<body class="container">
<br/>
<h1>订单列表</h1>
<br/><br/>
<div class="with:80%">
    <table class="table table-hover">
        <thead>
        <tr>
            <th>序号</th>
            <th>订单开始时间</th>
            <th>订单结束时间</th>
            <th>租房人</th>
            <th>公寓编号</th>
            <th>是否支付</th>
            <th>删除</th>
        </tr>
        </thead>
        <tbody>
        <tr  th:each="indent : ${indents}">
            <th scope="row" th:text="${indent.id}"></th>
            <td th:text="${#dates.format(indent.begintime,'yyyy-MM-dd')}"></td>
            <td th:text="${#dates.format(indent.endtime,'yyyy-MM-dd')}"></td>
            <td th:text="${indent.userId}"></td>
            <td th:text="${indent.apartmentId}"></td>
            <td th:text="${indent.pay_status}"></td>
            <td><a th:href="@{/order/delete(id=${indent.id})}">删除</a></td>
        </tr>
        </tbody>
    </table>
</div>
<div class="form-group">
    <div class="col-sm-2 control-label" >
        <a href="userLogin.html" th:href="@{/order/toAdd}" class="btn btn-info">添加</a>
    </div>
</div>
</body>
</html>